<script>
export default {
name: "guoLu",
    data(){
      return {
        msg:'大宝贝，我真爱你',
      }
    },
  // 过滤器
  filters: {
    setMsg3(data, format) {
      console.log(data)
      console.log(format)
      return data.replace('宝贝','***').replace('爱','***')
    }
  },
  methods:{
    key(e){
      console.log(e)
      console.log('测试')
    }
  },
}
</script>

<template>
  <div>
    {{msg | bao(666)}}
<!--    键盘修饰符-->
    <input type="text" @keyup.w="key">
    <input type="text" @keyup.s="key">
    <input type="text" @keyup.a="key">
    <input type="text" @keyup.d="key">
    <input type="text" @keyup.65="key">
    <div>{{msg | setMsg3(111)}}</div>
  </div>
</template>

<style scoped lang="less">

</style>